package cn.JHai.service.impl;

import cn.JHai.dao.MusicDao;
import cn.JHai.domain.Music;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service("musicServiceImp")
public class MusicServiceImp implements MusicDao{


    @Autowired
    MusicDao musicDao;
    @Override
    public boolean insert(Music music) {
        return musicDao.insert(music);
    }

    @Override
    public ArrayList<Music> findAll() {
        return musicDao.findAll();
    }

    @Override
    public Music find(String mid) {
        return musicDao.find(mid);
    }

    @Override
    public ArrayList<Music> findmusic(String name) {
        return musicDao.findmusic(name);
    }

    @Override
    public boolean delete(int id) {
        return musicDao.delete(id);
    }

    @Override
    public boolean update(Music music) {
        return musicDao.update(music);
    }
}
